package junit;

import org.junit.Test;
import pojo.User;
import service.UserService;
import service.impl.UserServiceImpl;

/**
 * @author Wxt
 * @create 2022-02-08 13:48
 */
public class UserServiceTest {
    private UserService userService = new UserServiceImpl();

    @Test
    public void registUser() {
        userService.registUser(new User(null, "wml168", "123456", "wml@168.com"));
        System.out.println("注册成功");
    }

    @Test
    public void login() {
        User loginUser = userService.login(new User(null, "admin", "admin", null));
        System.out.println(loginUser);
    }

    @Test
    public void existUsername() {
        System.out.println(userService.existUsername("wxt"));
    }
}